const connections = require('../app/database')
class DetailService {
  async getDetailById(id) {
    const statement = 'SELECT * FROM `goods-detail` WHERE goods_id = ?'
    const res = await connections.execute(statement, [id])
    return res[0]
  }
}

module.exports = new DetailService()